// import sidebarAction from '../actions/sidebar';
import _ from 'underscore';

let initState = {
	isOpen:false
}

function sidebar(state = initState,action){
	switch(action.type){
		case 'TOGGLESIDEBAR':
			return _.assign({},state,{isOpen:!state.isOpen});
		case 'OPENSIDEBAR':
			return _.extend({},state,{isOpen:true});
		case 'CLOSESIDEBAR':
			return _.extend({},state,{isOpen:false});
		default: return state;
	}
}

export default sidebar;